export const option = {
    backgroundColor: '#030f24',
    tooltip: {
        show: true,
        backgroundColor: "rgba(166, 200, 76, 0.82)",
        borderColor: "#FFFFCC",
        formatter: function (params, ticket, callback) {
            return "<span style='color:#fff;'>" + params.name + "</span>"
        },
    },
    geo: {
        // 注册的地图名
        map: 'lc',
        // 每个组件的层级
        z: 0,
        // 宽高比
        aspectScale: 1,
        // 区域样式
        itemStyle: {
            areaColor: "#062a74",
            shadowColor: "#3070d8",
            shadowBlur: 5,
            shadowOffsetX: 0,
            shadowOffsetY: 10,
            borderColor: "#cdbb41",
            borderWidth: 1,
        },
        // 鼠标移入样式
        emphasis: {
            // 区域样式
            itemStyle: {
                areaColor: "#2AB8FF",
                borderColor: "red",
                borderWidth: 2,
                color: '#fff',


            },
            // 标签样式
            label: {
                color: 'red',
            },
        },
        // 每个区域的地名标签
        label: {
            show: false,
            color: '#fff',
        },
        tooltip: {
            show: true,
            backgroundColor: "rgba(166, 200, 76, 0.82)",
            borderColor: "red",
            formatter: function (params, ticket, callback) {
                return "<span style='color:#fff;'>" + params.name + "</span>"
            },
        }

    },
    series: [
        {
            type: 'map',
            map: 'lc',
            z: 1,
            // left:'0',
            aspectScale: 1,
            itemStyle: {
                areaColor: "#062a74",
                shadowColor: "#3070d8",
                shadowBlur: 0,
                shadowOffsetX: 0,
                shadowOffsetY: 0,
                borderColor: "#cdbb41",
                borderWidth: 1,
            },
        },
        {
            // 散点图
            type: "scatter",
            // 使用地理坐标系
            coordinateSystem: "geo",
            // zlevel: 10,
            label: {
                show: true,
                color: '#fff',
                position: "right", //显示位置
                offset: [-60, -30], //偏移设置
                formatter: function (params) {
                    return params.data.name;
                },
            },
            // 标记的图形
            symbol: "image:// " + require('./地图标点.png'),
            // 标记图形大小 宽/高
            symbolSize: [142, 92],
            data: [
                {
                    "value": [105.261038, 29.382143],
                    "name": "人民100kW光伏电站"
                },
                {
                    "value": [105.260705, 29.435368],
                    "name": "薄刀55kW光伏电站"
                },
                {
                    "value": [105.378705, 29.382143],
                    "name": "迎祥200kW光伏电站"
                },
                {
                    "value": [105.205258, 29.342143],
                    "name": "高新工业园区100kW光伏电站"
                },
                {
                    "value": [105.331258, 29.302143],
                    "name": "山川2MW光伏电站"
                },
                {
                    "value": [105.181038, 29.402143],
                    "name": "高新工业园区储能电站"
                }
            ],
        },
    ]

};